<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <script>
        let str =
            "_img_top|img_left||width|height|min_width|max_width|min_height|max_height|export_scale|cut_top|cut_left|canvas_top|canvas_left|img_width|img_height|scale|angle|min_scale|max_scale".indexOf(
                "width"
            );

        console.log(str);

        let val = '250.12364%'
        let ret = parseFloat(val)
        console.log(ret);
        console.log(ret.toFixed(3));
    </script>
</body>

</html>